﻿#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;

    using Csla;

    using MarketPulse.BusinessLogic.Core;

#endregion

namespace MarketPulse.BusinessLogic.Common
{
    /// <summary>
    /// Class used as a (guid based enumeration) list that holds the possible types for Country.
    /// </summary>
    [Serializable]
    [Csla.Server.ObjectFactory("MarketPulse.DataAccess.Factory.AssignmentFactory, MarketPulse.DataAccess.Factory", "FetchAssignmentStatusTypeList")]
    public class AssignmentStatusTypeList : MarketPulseNameValueListBase<Guid, string>
    {
        #region Member Variables

            /// <summary>List to hold all the possible AssignmentStatusType values</summary>
            private static AssignmentStatusTypeList mAssignmentStatusTypes;

        #endregion

        #region Constructors

            /// <summary>
            /// Default constructor is private in order to (try to) enforce construction
            /// via only the static factory methods provided.
            /// </summary>
            private AssignmentStatusTypeList()
            {
            }

        #endregion

        #region Methods

            #region Factory Methods

                /// <summary>
                /// Method used to retrieve a list of AssignmentStatusType objects. Internally this accesses a static field so this
                /// class is effectively a lazily instantiated singleton.
                /// </summary>
                /// <returns>A valid (populated) list of AssignmentStatusType objects</returns>
                public static AssignmentStatusTypeList GetAll()
                {
                    // Load the list if it's null
                    if (mAssignmentStatusTypes == null)
                    {
                        mAssignmentStatusTypes = DataPortal.Fetch<AssignmentStatusTypeList>();
                    }
                    return mAssignmentStatusTypes;
                }

            #endregion

            //public static Guid GetByValue(string value)
            //{
            //    return mAssignmentStatusTypes.Where(st => st.Value.Equals(value)).FirstOrDefault().Key;
            //}

        #endregion

        #region Properties

            /// <summary>The Guid for the 'Created' Status</summary>
            public static Guid Created { get { return new Guid("8B13CBFE-EF6D-40F8-A142-46E0604C48FD"); } }

            /// <summary>The Guid for the 'Released' Status</summary>
            public static Guid Released { get { return new Guid("1C2785F1-4941-43A8-800F-771DA0F5E7AE"); } }

            /// <summary>The Guid for the 'Assigned' Status</summary>
            public static Guid Assigned { get { return new Guid("62FD3065-EB39-483D-81E0-50BC1DF84551"); } }

            /// <summary>The Guid for the 'Transferred' Status</summary>
            public static Guid Transferred { get { return new Guid("3F3C7541-D89A-4B9E-B268-788B7C918D1F"); } }

            /// <summary>The Guid for the 'Completed' Status</summary>
            public static Guid Completed { get { return new Guid("210F6A66-6DBF-411C-B6F3-3DB656C5EC97"); } }

            /// <summary>The Guid for the 'DataEntryInProgress' Status</summary>
            public static Guid DataEntryInProgress { get { return new Guid("9B46B126-C0C3-4127-BBA3-0190ED89B529"); } }

            /// <summary>The Guid for the 'AwaitingQA' Status</summary>
            public static Guid AwaitingQA { get { return new Guid("87A8DA32-923D-4E3F-A3C6-1705D2E7E897"); } }

            /// <summary>The Guid for the 'QAInProgress' Status</summary>
            public static Guid QAInProgress { get { return new Guid("E44C054B-8ADE-42EB-98B8-045FA0284D0A"); } }

            /// <summary>The Guid for the 'QAApproved' Status</summary>
            public static Guid QAApproved { get { return new Guid("A4CDC30E-E0BF-49DE-9814-D0FB9363222B"); } }

            /// <summary>The Guid for the 'QAOnHold' Status</summary>
            public static Guid QAOnHold { get { return new Guid("C8D91989-830D-4FEA-926F-8DBD6127087B"); } }

            /// <summary>The Guid for the 'QAFailed' Status</summary>
            public static Guid QAFailed { get { return new Guid("F9598B1C-A91D-46BD-90E0-68621C55F801"); } }

            /// <summary>The Guid for the 'ReadyForTransfer' Status</summary>
            public static Guid ReadyForTransfer { get { return new Guid("8FBF86C5-66B7-4281-A385-CFFB32E4BAC1"); } }

        #endregion

    }
}
